In a process of using a token bucket to control traffic of a data network, when a token in the token bucket is used up, it indicates that no traffic in the data network can be allocated to a queue corresponding to the token bucket; therefore, the queue corresponding to the token bucket needs to exit scheduling temporarily. At this moment, the token bucket needs to be disabled, and a scheduling request sent by the queue corresponding to the disabled token bucket needs to be used as a delay request for processing. When delay request time of a queue arrives, that is, when enough tokens are accumulated in the disabled token bucket, the disabled token bucket is enabled again, and the queue corresponding to this token bucket participates in the scheduling again.
In the prior art, when delay requests of queues corresponding to token buckets are processed, all delay request information of queues that send delay requests is stored in one memory, then a queue of which delay request time has arrived is obtained by scanning the memory, and the queue of which the delay request time has arrived is processed.
In a practical application, there are always a large number of queues that send delay requests; therefore, a scanning period is long when delay requests of queues are processed in a processing manner in the prior art.